package com.payment.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @Author kuang
 * @Date 2021/8/8 21:25
 */
@Slf4j
@RequestMapping(value = "/payment")
@RestController
public class ConsulController {

    @Value("${server.port}")
    private String serverPort;

    @RequestMapping(value = "/consul")
    public String paymentConsul() {
        log.info("consul:{}", UUID.randomUUID());
        return "consul:" + serverPort + UUID.randomUUID();
    }
}
